package fr.vahren.processing.entity;

import processing.core.PApplet;
import traer.physics.Particle;

public abstract class Entity {

	protected boolean anti;
	protected Particle particle;

	protected int speed;

	protected PApplet pA;

	protected boolean picked = false;

	public abstract void draw();


	public abstract void checkVelocity();

	public void pick() {
		picked = !picked;
	}

	/**
	 * @return the particle
	 */
	public Particle getParticle() {
		return particle;
	}

	/**
	 * @param particle
	 *            the particle to set
	 */
	public void setParticle(Particle particle) {
		this.particle = particle;
	}

	/**
	 * @return the pA
	 */
	public PApplet getpA() {
		return pA;
	}

	/**
	 * @param pA
	 *            the pA to set
	 */
	public void setpA(PApplet pA) {
		this.pA = pA;
	}

	/**
	 * @return the anti
	 */
	public boolean isAnti() {
		return anti;
	}

	/**
	 * @param anti
	 *            the anti to set
	 */
	public void setAnti(boolean anti) {
		this.anti = anti;
	}

	public float x() {
		return particle.position().x();
	}

	public float y() {
		return particle.position().y();
	}

	public float z() {
		return particle.position().z();
	}

	public void setX(int x) {
		particle.position().setX(x);
	}

	public void setY(int y) {
		particle.position().setY(y);
	}

	public void setZ(int z) {
		particle.position().setZ(z);
	}

	/**
	 * @return the speed
	 */
	public int getSpeed() {
		return speed;
	}

	/**
	 * @return the picked
	 */
	public boolean isPicked() {
		return picked;
	}

	/**
	 * @param picked
	 *            the picked to set
	 */
	public void setPicked(boolean picked) {
		this.picked = picked;
	}

	/**
	 * @param speed
	 *            the speed to set
	 */
	public void setSpeed(int speed) {
		this.speed = speed;
	}
}
